//
// Created by Tony on 2024/5/27.
//

#ifndef PARSER_STMT_PARSER_H
#define PARSER_STMT_PARSER_H

#include "ExprParser.h"
#include "ast/Ast.h"
#include "ast/list/stmt/BlockStmt.h"
#include "ast/list/stmt/ForStmt.h"
#include "ast/list/stmt/IfStmt.h"
#include "ast/list/stmt/ImportStmt.h"
#include "ast/list/stmt/ReturnStmt.h"
#include "ast/list/stmt/SimpleStmt.h"
#include "ast/list/stmt/VarDefStmt.h"

namespace Parser {

class StmtParser : public ExprParser {
public:
    StmtParser() = default;
    shared_ptr<Ast> parse() override;

protected:
    shared_ptr<SimpleStmt> simpleStmt();
    shared_ptr<VarDefStmt> varDefStmt();
    shared_ptr<IfStmt> ifStmt();
    shared_ptr<ForStmt> forStmt();
    shared_ptr<Ast> stmt();
    shared_ptr<BlockStmt> block();
    shared_ptr<ReturnStmt> returnStmt();
    shared_ptr<ImportStmt> importStmt();
};
} // namespace Parser

#endif // PARSER_STMT_PARSER_H
